<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: include/mqtt.hpp 源文件</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">mqtt.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d5/d27/mqtt_8hpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &lt;map&gt;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &lt;atomic&gt;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &lt;mutex&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#include &quot;MQTTClient.h&quot;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../df/d8d/namespacewheels.html">wheels</a>{</div>
<div class="foldopen" id="foldopen00016" data-start="{" data-end="};">
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html">   16</a></span><span class="keyword">class </span><a class="code hl_class" href="../../dc/d63/classwheels_1_1mqtt_client.html">mqttClient</a></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span>{</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00019" data-start="{" data-end="};">
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616">   19</a></span>    <span class="keyword">enum</span> <a class="code hl_enumeration" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616">emErrCode</a>{</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a33c6b9b9cdffb437ff82f7b0c92796a2">   20</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a33c6b9b9cdffb437ff82f7b0c92796a2">ERR_ALLOC_MEM</a> = -1000,   <span class="comment">// 内存分配事变</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a8eff9f87415d22cf12e9ee6136bbae55">   21</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a8eff9f87415d22cf12e9ee6136bbae55">ERR_USR_PSWD</a>,            <span class="comment">// 用户名或者密码错误</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616ae85f474018fc5e71caf05c110a08c0b0">   22</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616ae85f474018fc5e71caf05c110a08c0b0">ERR_CONN</a>,                <span class="comment">// 连接失败</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616ae19fede179cf0ab078776cd54de79e3e">   23</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616ae19fede179cf0ab078776cd54de79e3e">ERR_CREATE_CTX</a>,          <span class="comment">// 创建MQTT句柄失败</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a85c545311ea0b331c9156178e2582321">   24</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a85c545311ea0b331c9156178e2582321">ERR_PUB</a>,</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616af41222b61563e3daed16805a628f4803">   25</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616af41222b61563e3daed16805a628f4803">ERR_SUB</a>,</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a30409d6c1d58cc54ade3ecc578596933">   26</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a30409d6c1d58cc54ade3ecc578596933">ERR_INSERT_CB</a>,</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a1d74073b96c95c75a22103ebb601f8bc">   27</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a1d74073b96c95c75a22103ebb601f8bc">ERR_UNSUB</a>,</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616ac28e9e41af6580a0fbb4c4befce3cddd">   28</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616ac28e9e41af6580a0fbb4c4befce3cddd">ERR_QOS_RANGE</a>,</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a6a8715111fc7a075e2289346cf61548e">   29</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a6a8715111fc7a075e2289346cf61548e">ERR_DATA_NULL</a>,</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616acfcae9b57ddf17a5e43b14c5d558bef3">   30</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616acfcae9b57ddf17a5e43b14c5d558bef3">ERR_URL_EMPTY</a>,</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a5806ee274c8dfa7902e5f995ac627401">   31</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a5806ee274c8dfa7902e5f995ac627401">ERR_CID_EMPTY</a>,</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a2b1c9d335ac095108055871883cf8ad0">   32</a></span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a2b1c9d335ac095108055871883cf8ad0">ERR_ACCOUNT_EMPTY</a>,</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>        <a class="code hl_enumvalue" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a26fb6f4f8581ee63fcb770371a50a5dc">OK</a> = 0</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a26fb6f4f8581ee63fcb770371a50a5dc">   34</a></span>    };</div>
</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span> </div>
<div class="foldopen" id="foldopen00037" data-start="{" data-end="};">
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html">   37</a></span>    <span class="keyword">struct </span><a class="code hl_struct" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html">stMsg</a> : <span class="keyword">public</span> MQTTClient_message{</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>        <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#a6f799cb83f0694a31c9590cbc1352229">stMsg</a>();</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>        <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#a6f799cb83f0694a31c9590cbc1352229">stMsg</a>( <span class="keyword">const</span> <a class="code hl_struct" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html">stMsg</a>&amp; b );</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>        <span class="keyword">explicit</span> <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#a6f799cb83f0694a31c9590cbc1352229">stMsg</a>( <span class="keyword">const</span> std::string&amp; data );</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>        <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#a6f799cb83f0694a31c9590cbc1352229">stMsg</a>( <span class="keyword">const</span> <span class="keywordtype">void</span> * data , <span class="keywordtype">size_t</span> len );</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>        <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#a6f799cb83f0694a31c9590cbc1352229">stMsg</a>( <span class="keywordtype">int</span> qos , <span class="keyword">const</span> <span class="keywordtype">void</span> * data , <span class="keywordtype">size_t</span> len , <span class="keywordtype">bool</span> retain = <span class="keyword">false</span> );</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>        <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#a6f799cb83f0694a31c9590cbc1352229">stMsg</a>( <span class="keyword">const</span> std::string&amp; data , <span class="keywordtype">int</span> qos , <span class="keywordtype">bool</span> retaiin = <span class="keyword">false</span> );</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>        <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#a20b10a02c98cf86ffc7b9c8ef35c9b96">~stMsg</a>();</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>        <a class="code hl_struct" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html">stMsg</a>&amp; <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#ac897bbe2745d1ecc1e7d90a4498c48fb">operator=</a>( <span class="keyword">const</span> <a class="code hl_struct" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html">stMsg</a>&amp; b );</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#aa4dd2f796a7c001e2acce2b026183dce">msg</a>( <span class="keyword">const</span> <span class="keywordtype">void</span> * data , <span class="keywordtype">size_t</span> len );</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>        <span class="keywordtype">void</span> <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#aa4dd2f796a7c001e2acce2b026183dce">msg</a>( <span class="keyword">const</span> std::string&amp; data );</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>        <span class="keyword">static</span> <a class="code hl_struct" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html">stMsg</a> <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#a76cd2f25cc8ce95667c217e3e9fad0ff">fromPaho</a>( <span class="keyword">const</span> MQTTClient_message&amp; <a class="code hl_function" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#aa4dd2f796a7c001e2acce2b026183dce">msg</a> );</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>    };</div>
</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#a4b272a0a34fd930f7340a59f5e0edbf5">   71</a></span>    <span class="keyword">typedef</span> std::map&lt; std::string , std::function&lt; void (<span class="keyword">const</span> std::string&amp; , <span class="keyword">const</span> <a class="code hl_struct" href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html">stMsg</a>&amp; ) &gt; &gt;  <a class="code hl_typedef" href="../../dc/d63/classwheels_1_1mqtt_client.html#a4b272a0a34fd930f7340a59f5e0edbf5">msgCallback</a>;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>    std::string                __m_cid;       <span class="comment">// 客户端ID</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>    std::string                __m_account;   <span class="comment">// 用户账号</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    std::string                __m_pswd;      <span class="comment">// 用户密码</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>    std::atomic&lt; bool &gt;        __m_is_connected; <span class="comment">// 是否建立连接</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>    std::atomic&lt; int &gt;         __m_wait_timeout; <span class="comment">// 等候超时时间，单位为ms</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>    std::function&lt; void () &gt;   __m_on_disconnected;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span>    <a class="code hl_typedef" href="../../dc/d63/classwheels_1_1mqtt_client.html#a4b272a0a34fd930f7340a59f5e0edbf5">msgCallback</a>                __m_msg_cb;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>    MQTTClient                 __m_client;    <span class="comment">// 客户端</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>    MQTTClient_deliveryToken   __m_dt;        <span class="comment">//</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>    <span class="keywordtype">int</span>                        __m_mqtt_version;</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>    std::mutex                 __m_mutex;</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>    <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#aa5e61c99c5000159df5ae7a8bef121ff">mqttClient</a>( <span class="keyword">const</span> std::string&amp; svr , <span class="keyword">const</span> std::string&amp; cid );</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span>    <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#aa5e61c99c5000159df5ae7a8bef121ff">mqttClient</a>( <span class="keyword">const</span> std::string&amp; svr , <span class="keyword">const</span> std::string&amp; cid , <span class="keyword">const</span> std::string&amp; usr , <span class="keyword">const</span> std::string&amp; pswd );</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span> </div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>    <span class="keyword">virtual</span> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#ae7b92bc1964d9d3bf1d64fb2f10d23fc">~mqttClient</a>();</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="../../dc/d63/classwheels_1_1mqtt_client.html#aa6e079b0c420f464d3b2ba100741f1bc">  102</a></span>    <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#aa6e079b0c420f464d3b2ba100741f1bc">version</a>( <span class="keywordtype">int</span> v ){ __m_mqtt_version = v; }</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>    </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>    <a class="code hl_enumeration" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616">emErrCode</a> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#a4329b65aa8c1abb55bcb3db9681fdaa3">connect</a>();</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>    <a class="code hl_enumeration" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616">emErrCode</a> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#a4329b65aa8c1abb55bcb3db9681fdaa3">connect</a>( <span class="keyword">const</span> std::string&amp; cid , <span class="keyword">const</span> std::string&amp; user , <span class="keyword">const</span> std::string&amp; pswd );</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>    </div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#a7bf7e3ef62cc9846865268cf499148ee">setDisconnect</a>( std::function&lt; <span class="keywordtype">void</span> ( ) &gt; fun );</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#ad7447ba17575882ac4c7c286d82c2b27">onDisconnect</a>( <span class="keyword">const</span> std::string&amp; cause );</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>    <a class="code hl_enumeration" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616">emErrCode</a> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#ac71f4aefef7cea607fc58569bfa23ce4">pub</a>( <span class="keyword">const</span> std::string&amp; topic , <span class="keyword">const</span> uint8_t * data , <span class="keywordtype">size_t</span> len );</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>    <a class="code hl_enumeration" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616">emErrCode</a> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#ac71f4aefef7cea607fc58569bfa23ce4">pub</a>( <span class="keyword">const</span> std::string&amp; topic , stMsg&amp; msg );</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span>    <a class="code hl_enumeration" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616">emErrCode</a> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#a100bbcd47136dca546d1b36ba4086845">sub</a>( <span class="keyword">const</span> std::string&amp; topic , <span class="keywordtype">int</span> qos, std::function&lt; <span class="keywordtype">void</span> ( <span class="keyword">const</span> std::string&amp; tp , <span class="keyword">const</span> stMsg&amp; ) &gt; cb );</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>    <a class="code hl_enumeration" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616">emErrCode</a> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#a75add329cda55d67c6e106e814617afd">unSub</a>( <span class="keyword">const</span> std::string&amp; topic );</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>    <span class="keywordtype">int</span> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#ad8891a42152cd57b070ff9605d836013">onRecv</a>( <span class="keyword">const</span> std::string&amp; tp , <span class="keyword">const</span> stMsg&amp; msg );</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#a087c54091586ca6631b483624ae01cbe">isConnected</a>();</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span> </div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#a677c0a83def22ef765ebe23803423d38">reconnect</a>( <span class="keyword">const</span> std::string&amp; cid , <span class="keyword">const</span> std::string&amp; pswd );</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span> </div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>    <span class="keyword">static</span> std::string <a class="code hl_function" href="../../dc/d63/classwheels_1_1mqtt_client.html#af3facee7aa2c691086a033399213b1bf">errMsg</a>( <a class="code hl_enumeration" href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616">emErrCode</a> e );</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>};</div>
</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>}</div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html">wheels::mqttClient</a></div><div class="ttdef"><b>定义</b> <a href="#l00016">mqtt.hpp:17</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a087c54091586ca6631b483624ae01cbe"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a087c54091586ca6631b483624ae01cbe">wheels::mqttClient::isConnected</a></div><div class="ttdeci">bool isConnected()</div><div class="ttdoc">是否已经成功建立连接</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00489">mqtt.cpp:489</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a100bbcd47136dca546d1b36ba4086845"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a100bbcd47136dca546d1b36ba4086845">wheels::mqttClient::sub</a></div><div class="ttdeci">emErrCode sub(const std::string &amp;topic, int qos, std::function&lt; void(const std::string &amp;tp, const stMsg &amp;) &gt; cb)</div><div class="ttdoc">订阅主题，并登记相关主题的回调函数</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00437">mqtt.cpp:437</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a4329b65aa8c1abb55bcb3db9681fdaa3"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a4329b65aa8c1abb55bcb3db9681fdaa3">wheels::mqttClient::connect</a></div><div class="ttdeci">emErrCode connect()</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00236">mqtt.cpp:236</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a4b272a0a34fd930f7340a59f5e0edbf5"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a4b272a0a34fd930f7340a59f5e0edbf5">wheels::mqttClient::msgCallback</a></div><div class="ttdeci">std::map&lt; std::string, std::function&lt; void(const std::string &amp;, const stMsg &amp;) &gt; &gt; msgCallback</div><div class="ttdef"><b>定义</b> <a href="#l00071">mqtt.hpp:71</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a677c0a83def22ef765ebe23803423d38"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a677c0a83def22ef765ebe23803423d38">wheels::mqttClient::reconnect</a></div><div class="ttdeci">void reconnect(const std::string &amp;cid, const std::string &amp;pswd)</div><div class="ttdoc">重新连接</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00286">mqtt.cpp:286</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a75add329cda55d67c6e106e814617afd"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a75add329cda55d67c6e106e814617afd">wheels::mqttClient::unSub</a></div><div class="ttdeci">emErrCode unSub(const std::string &amp;topic)</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00473">mqtt.cpp:473</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a7bf7e3ef62cc9846865268cf499148ee"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a7bf7e3ef62cc9846865268cf499148ee">wheels::mqttClient::setDisconnect</a></div><div class="ttdeci">void setDisconnect(std::function&lt; void() &gt; fun)</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00374">mqtt.cpp:374</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616">wheels::mqttClient::emErrCode</a></div><div class="ttdeci">emErrCode</div><div class="ttdef"><b>定义</b> <a href="#l00019">mqtt.hpp:19</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616a1d74073b96c95c75a22103ebb601f8bc"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a1d74073b96c95c75a22103ebb601f8bc">wheels::mqttClient::ERR_UNSUB</a></div><div class="ttdeci">@ ERR_UNSUB</div><div class="ttdef"><b>定义</b> <a href="#l00027">mqtt.hpp:27</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616a26fb6f4f8581ee63fcb770371a50a5dc"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a26fb6f4f8581ee63fcb770371a50a5dc">wheels::mqttClient::OK</a></div><div class="ttdeci">@ OK</div><div class="ttdef"><b>定义</b> <a href="#l00034">mqtt.hpp:33</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616a2b1c9d335ac095108055871883cf8ad0"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a2b1c9d335ac095108055871883cf8ad0">wheels::mqttClient::ERR_ACCOUNT_EMPTY</a></div><div class="ttdeci">@ ERR_ACCOUNT_EMPTY</div><div class="ttdef"><b>定义</b> <a href="#l00032">mqtt.hpp:32</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616a30409d6c1d58cc54ade3ecc578596933"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a30409d6c1d58cc54ade3ecc578596933">wheels::mqttClient::ERR_INSERT_CB</a></div><div class="ttdeci">@ ERR_INSERT_CB</div><div class="ttdef"><b>定义</b> <a href="#l00026">mqtt.hpp:26</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616a33c6b9b9cdffb437ff82f7b0c92796a2"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a33c6b9b9cdffb437ff82f7b0c92796a2">wheels::mqttClient::ERR_ALLOC_MEM</a></div><div class="ttdeci">@ ERR_ALLOC_MEM</div><div class="ttdef"><b>定义</b> <a href="#l00020">mqtt.hpp:20</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616a5806ee274c8dfa7902e5f995ac627401"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a5806ee274c8dfa7902e5f995ac627401">wheels::mqttClient::ERR_CID_EMPTY</a></div><div class="ttdeci">@ ERR_CID_EMPTY</div><div class="ttdef"><b>定义</b> <a href="#l00031">mqtt.hpp:31</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616a6a8715111fc7a075e2289346cf61548e"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a6a8715111fc7a075e2289346cf61548e">wheels::mqttClient::ERR_DATA_NULL</a></div><div class="ttdeci">@ ERR_DATA_NULL</div><div class="ttdef"><b>定义</b> <a href="#l00029">mqtt.hpp:29</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616a85c545311ea0b331c9156178e2582321"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a85c545311ea0b331c9156178e2582321">wheels::mqttClient::ERR_PUB</a></div><div class="ttdeci">@ ERR_PUB</div><div class="ttdef"><b>定义</b> <a href="#l00024">mqtt.hpp:24</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616a8eff9f87415d22cf12e9ee6136bbae55"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616a8eff9f87415d22cf12e9ee6136bbae55">wheels::mqttClient::ERR_USR_PSWD</a></div><div class="ttdeci">@ ERR_USR_PSWD</div><div class="ttdef"><b>定义</b> <a href="#l00021">mqtt.hpp:21</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616ac28e9e41af6580a0fbb4c4befce3cddd"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616ac28e9e41af6580a0fbb4c4befce3cddd">wheels::mqttClient::ERR_QOS_RANGE</a></div><div class="ttdeci">@ ERR_QOS_RANGE</div><div class="ttdef"><b>定义</b> <a href="#l00028">mqtt.hpp:28</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616acfcae9b57ddf17a5e43b14c5d558bef3"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616acfcae9b57ddf17a5e43b14c5d558bef3">wheels::mqttClient::ERR_URL_EMPTY</a></div><div class="ttdeci">@ ERR_URL_EMPTY</div><div class="ttdef"><b>定义</b> <a href="#l00030">mqtt.hpp:30</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616ae19fede179cf0ab078776cd54de79e3e"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616ae19fede179cf0ab078776cd54de79e3e">wheels::mqttClient::ERR_CREATE_CTX</a></div><div class="ttdeci">@ ERR_CREATE_CTX</div><div class="ttdef"><b>定义</b> <a href="#l00023">mqtt.hpp:23</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616ae85f474018fc5e71caf05c110a08c0b0"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616ae85f474018fc5e71caf05c110a08c0b0">wheels::mqttClient::ERR_CONN</a></div><div class="ttdeci">@ ERR_CONN</div><div class="ttdef"><b>定义</b> <a href="#l00022">mqtt.hpp:22</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_a9ef036b2ecddf62dde5597f6e9936616af41222b61563e3daed16805a628f4803"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#a9ef036b2ecddf62dde5597f6e9936616af41222b61563e3daed16805a628f4803">wheels::mqttClient::ERR_SUB</a></div><div class="ttdeci">@ ERR_SUB</div><div class="ttdef"><b>定义</b> <a href="#l00025">mqtt.hpp:25</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_aa5e61c99c5000159df5ae7a8bef121ff"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#aa5e61c99c5000159df5ae7a8bef121ff">wheels::mqttClient::mqttClient</a></div><div class="ttdeci">mqttClient(const std::string &amp;svr, const std::string &amp;cid)</div><div class="ttdoc">构造MQTT客户端。在默认情况下如果不指定MQTT协议的版本，以3.1.1版本尝试连接；如果练级失败会尝试以3.1连接，再次失败会以5.0版本尝试</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00186">mqtt.cpp:186</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_aa6e079b0c420f464d3b2ba100741f1bc"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#aa6e079b0c420f464d3b2ba100741f1bc">wheels::mqttClient::version</a></div><div class="ttdeci">void version(int v)</div><div class="ttdef"><b>定义</b> <a href="#l00102">mqtt.hpp:102</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_ac71f4aefef7cea607fc58569bfa23ce4"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#ac71f4aefef7cea607fc58569bfa23ce4">wheels::mqttClient::pub</a></div><div class="ttdeci">emErrCode pub(const std::string &amp;topic, const uint8_t *data, size_t len)</div><div class="ttdoc">采用默认的消息体发布消息，在默认情况下Qos = 1, retain = true， dup=0</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00393">mqtt.cpp:393</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_ad7447ba17575882ac4c7c286d82c2b27"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#ad7447ba17575882ac4c7c286d82c2b27">wheels::mqttClient::onDisconnect</a></div><div class="ttdeci">void onDisconnect(const std::string &amp;cause)</div><div class="ttdoc">onDisconnect</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00379">mqtt.cpp:379</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_ad8891a42152cd57b070ff9605d836013"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#ad8891a42152cd57b070ff9605d836013">wheels::mqttClient::onRecv</a></div><div class="ttdeci">int onRecv(const std::string &amp;tp, const stMsg &amp;msg)</div><div class="ttdoc">处理接收到消息后的操作</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00496">mqtt.cpp:496</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_ae7b92bc1964d9d3bf1d64fb2f10d23fc"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#ae7b92bc1964d9d3bf1d64fb2f10d23fc">wheels::mqttClient::~mqttClient</a></div><div class="ttdeci">virtual ~mqttClient()</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00368">mqtt.cpp:368</a></div></div>
<div class="ttc" id="aclasswheels_1_1mqtt_client_html_af3facee7aa2c691086a033399213b1bf"><div class="ttname"><a href="../../dc/d63/classwheels_1_1mqtt_client.html#af3facee7aa2c691086a033399213b1bf">wheels::mqttClient::errMsg</a></div><div class="ttdeci">static std::string errMsg(emErrCode e)</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00320">mqtt.cpp:320</a></div></div>
<div class="ttc" id="anamespacewheels_html"><div class="ttname"><a href="../../df/d8d/namespacewheels.html">wheels</a></div><div class="ttdoc">堆栈信息读取和保存记录</div><div class="ttdef"><b>定义</b> <a href="../../d3/df7/ary__str_8hpp_source.html#l00006">ary_str.hpp:7</a></div></div>
<div class="ttc" id="astructwheels_1_1mqtt_client_1_1st_msg_html"><div class="ttname"><a href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html">wheels::mqttClient::stMsg</a></div><div class="ttdoc">从path.mqtt继承消息结构，提供消息构造接口</div><div class="ttdef"><b>定义</b> <a href="#l00037">mqtt.hpp:37</a></div></div>
<div class="ttc" id="astructwheels_1_1mqtt_client_1_1st_msg_html_a20b10a02c98cf86ffc7b9c8ef35c9b96"><div class="ttname"><a href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#a20b10a02c98cf86ffc7b9c8ef35c9b96">wheels::mqttClient::stMsg::~stMsg</a></div><div class="ttdeci">~stMsg()</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00135">mqtt.cpp:136</a></div></div>
<div class="ttc" id="astructwheels_1_1mqtt_client_1_1st_msg_html_a6f799cb83f0694a31c9590cbc1352229"><div class="ttname"><a href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#a6f799cb83f0694a31c9590cbc1352229">wheels::mqttClient::stMsg::stMsg</a></div><div class="ttdeci">stMsg()</div><div class="ttdoc">默认构造qos = 1, retain = true; 构造后需要调用msg来指定消息数据内容。 也可以调用包含数据参数的构造</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00059">mqtt.cpp:60</a></div></div>
<div class="ttc" id="astructwheels_1_1mqtt_client_1_1st_msg_html_a76cd2f25cc8ce95667c217e3e9fad0ff"><div class="ttname"><a href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#a76cd2f25cc8ce95667c217e3e9fad0ff">wheels::mqttClient::stMsg::fromPaho</a></div><div class="ttdeci">static stMsg fromPaho(const MQTTClient_message &amp;msg)</div><div class="ttdoc">从paho.mqtt构造对象</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00170">mqtt.cpp:170</a></div></div>
<div class="ttc" id="astructwheels_1_1mqtt_client_1_1st_msg_html_aa4dd2f796a7c001e2acce2b026183dce"><div class="ttname"><a href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#aa4dd2f796a7c001e2acce2b026183dce">wheels::mqttClient::stMsg::msg</a></div><div class="ttdeci">void msg(const void *data, size_t len)</div><div class="ttdoc">指定消息内容</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00153">mqtt.cpp:154</a></div></div>
<div class="ttc" id="astructwheels_1_1mqtt_client_1_1st_msg_html_ac897bbe2745d1ecc1e7d90a4498c48fb"><div class="ttname"><a href="../../d0/d12/structwheels_1_1mqtt_client_1_1st_msg.html#ac897bbe2745d1ecc1e7d90a4498c48fb">wheels::mqttClient::stMsg::operator=</a></div><div class="ttdeci">stMsg &amp; operator=(const stMsg &amp;b)</div><div class="ttdef"><b>定义</b> <a href="../../d8/d5b/mqtt_8cpp_source.html#l00142">mqtt.cpp:143</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
